/**
 * User: rmikhaylenko mirusnet@gmail.com
 * Date: 14/05/13
 * Time: 14:27
 */

public enum StoreOptions {
    PLAYLIST("-playlist", "-p", 2),
    CREATELIST("-createlist", "-c", 3),
    SHOWPLAYLISTS("-showplaylists", "-s", 1),
    SHOWHELP("-help", "-h", 1),
    PLAYLIST_SLEEPMODE("-playlistsleepmode", "-ps", 3);

    private String longOption;
    private String shortOption;
    private int optionCount;

    private StoreOptions(String longoption, String shortoption, int optioncount) {
        this.longOption = longoption;
        this.shortOption = shortoption;
        this.optionCount = optioncount;
    }

    public String getLongOption() {
        return longOption;
    }

    public String getShortOption() {
        return shortOption;
    }

    public int getOptionCount() {
        return optionCount;
    }
    public static void showUsage() {
        System.out.println("Usage:");
        System.out.println("\tjava -jar Jmplayer.jar options\n");
        System.out.println("Short options:");
        System.out.println("\t-c\tplaylistname directory\t| Create playlist based on the given direcory");
        System.out.println("\t-p\tplaylistname\t\t| Play movies in playlist");
        System.out.println("\t-ps\tplaylistname m\t\t| Play movies in playlist and shutdown the computer in m minutes ");
        System.out.println("\t-s\t\t\t\t| Show available playlists");
        System.out.println("Long options:");
        System.out.println("\t-c\t-createlist");
        System.out.println("\t-p\t-playlist");
        System.out.println("\t-ps\t-playlistsleepmode");
        System.out.println("\t-s\t-showplaylists");
        System.exit(1);
    }
}

